import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import home from '@/views/tab/home'
import vip from '@/views/tab/vip'
import shopcar from '@/views/tab/shopcar'
import search from '@/views/tab/search'
import newlist from '@/views/new/newlist'
import newinfo from '@/views/new/newinfo'
import picture from '@/views/pictures/picture'
import photoinfo from '@/views/pictures/photoinfo'
import good from '@/views/goods/good'
import goodinfo from '@/views/goods/goodinfo'
import goodscom from '@/views/goods/goodscom'
import goodsdec from '@/views/goods/goodsdec'

export default new Router({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            name: 'home',
            component: home,
        },
        {
            path: '/vip',
            name: 'vip',
            component: vip,
        },
        {
            path: '/shopcar',
            name: 'shopcar',
            component: shopcar,
        }, {
            path: '/search',
            name: 'search',
            component: search,
        }, {
            path: '/home/newlist',
            name: 'newlist',
            component: newlist,
        }, {
            path: '/home/newlist/:id',
            name: 'newinfo',
            component: newinfo
        }, {
            path: '/home/picture',
            name: 'picture',
            component: picture
        }, {
            path: '/home/photoinfo/:id',
            name: 'photoinfo',
            component: photoinfo
        },
        {
            path: '/home/goods',
            name: 'good',
            component: good
        },
        {
            // path:'/home/goodinfo/:id'
            // path: '/home/goodinfo',  
            path: '/home/goodinfo/:id',
            name: 'goodinfo',
            component: goodinfo
        },
        {
            path: '/home/goodscom/:id',
            name: 'goodscom',
            component: goodscom
        },
        {
            path: '/home/goodsdec/:id',
            name: 'goodsdec',
            component: goodsdec
        }

    ],
    linkActiveClass: "mui-active" //覆盖默认高亮样式
})